<template>
  <div class="page-header">
    <span @click="handleCollapse">
      <el-icon-expand v-if="collapse"></el-icon-expand>
      <el-icon-fold v-else></el-icon-fold>
    </span>
  </div>
</template>

<script setup lang="ts">
let props = defineProps<{ collapse: boolean }>();
let emits = defineEmits(["update:collapse"]);

function handleCollapse() {
  emits("update:collapse", !props.collapse);
}
</script>

<style lang="scss" scoped>
.page-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
}
</style>
